Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove async from trustroot trait #350

Closed

Conversation

flavio
Copy link
Member

@flavio flavio commented Apr 10, 2024

Note: this PR builds on top of #348 and #349. I'll rebase it once those are merged.

This PR makes the methods defined inside of the sigstore::trust::TrustRoot trait non-async. This fixes #346

The `sigstore::trust::sigstore::SigstoreTrustRoot` can hold multiple
Rekor keys.

The possibility to have multiple keys is also reflected by the
[`sigstore::trust::TrustRoot.rekor_keys`](https://docs.rs/sigstore/0.9.0/sigstore/trust/trait.TrustRoot.html#tymethod.rekor_keys)
trait.

This commit allows the `ManualTrustRoot` object to hold multiple Rekor
keys.

Signed-off-by: Flavio Castelli <[email protected]>
Allow to create `static` instances of the `cosign::Client`,
`sigstore::trust::ManualTrustRoot`.

The ability to create `static` instances of these objects can simplify
the downstream consumers of this library.

The approach taken to create these `static` instance is the same used by
[`rustls_pki_types::CertificateDer::into_owned`](https://docs.rs/rustls-pki-types/1.4.1/rustls_pki_types/struct.CertificateDer.html#method.into_owned)

Signed-off-by: Flavio Castelli <[email protected]>
Make the `sigstore::trust::TrustRoot` methods not async.

Fixes sigstore#346

Signed-off-by: Flavio Castelli <[email protected]>
Copy link
Collaborator

@viccuad viccuad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@flavio
Copy link
Member Author

flavio commented Apr 12, 2024

Closing, this is done as part of #311

@flavio flavio closed this Apr 12, 2024
@flavio flavio deleted the remove-async-from-trustroot-trait branch April 12, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove async from sigstore::trust::TrustRoot trait
2 participants